package com.jx.db137.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jx.db137.common.R;
import com.jx.db137.entity.Menu;
import com.jx.db137.entity.Role;
import com.jx.db137.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author jx
 * @version 1.0
 * @Description
 * @date 2024/12/24 11:42
 */
@Repository
@Mapper
public interface UserMapper extends BaseMapper<User> {

    /**
     * 根据用户id返回用户的菜单集合
     * @param userid
     * @return
     */
    List<Menu> selectUserMenuByUserId(@Param("userid") Integer userid);
    @Select("select * from user where id=#{userid}")
    User selectUser(Integer userid);
}
